<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title></title>
</head>
<body>
    <p id="p1"><b>hello</b>wolld!</p>
    <script>
        var supportsRange = document.implementation.hasFeature("Range","2.0")
        var alsoSupportsRange = (typeof document.createRange == "function");
        console.log(supportsRange);
        var range1 = document.createRange();
        var range2 = document.createRange();
            p1 = document.getElementById("p1");
        range1.selectNode(p1);
        alert(range1);
        console.log(range1.selectNode(p1));
        range2.selectNodeContents(p1);
        alert(range2);
    </script>
</body>
</html>